import service from '@/utils/request'
// @Tags Patient
// @Summary 创建patient表
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data body model.Patient true "创建patient表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"创建成功"}"
// @Router /patient/createPatient [post]
export const createPatient = (data) => {
  return service({
    url: '/patient/createPatient',
    method: 'post',
    data
  })
}

// @Tags Patient
// @Summary 删除patient表
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data body model.Patient true "删除patient表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /patient/deletePatient [delete]
export const deletePatient = (params) => {
  return service({
    url: '/patient/deletePatient',
    method: 'delete',
    params
  })
}

// @Tags Patient
// @Summary 批量删除patient表
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data body request.IdsReq true "批量删除patient表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /patient/deletePatient [delete]
export const deletePatientByIds = (params) => {
  return service({
    url: '/patient/deletePatientByIds',
    method: 'delete',
    params
  })
}

// @Tags Patient
// @Summary 更新patient表
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data body model.Patient true "更新patient表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
// @Router /patient/updatePatient [put]
export const updatePatient = (data) => {
  return service({
    url: '/patient/updatePatient',
    method: 'put',
    data
  })
}

// @Tags Patient
// @Summary 用id查询patient表
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data query model.Patient true "用id查询patient表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /patient/findPatient [get]
export const findPatient = (params) => {
  return service({
    url: '/patient/findPatient',
    method: 'get',
    params
  })
}

// @Tags Patient
// @Summary 分页获取patient表列表
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data query request.PageInfo true "分页获取patient表列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /patient/getPatientList [get]
export const getPatientList = (params) => {
  return service({
    url: '/patient/getPatientList',
    method: 'get',
    params
  })
}

export const getPatientGroups = () => {
  return service({
    url: '/patient/getPatientGroups',
    method: 'get'
  })
}

export const getDepartmentGroups = () => {
  return service({
    url: '/patient/getDepartmentGroups',
    method: 'get'
  })
}

// @Tags Patient
// @Summary 不需要鉴权的patient表接口
// @Accept application/json
// @Produce application/json
// @Param data query patientsReq.PatientSearch true "分页获取patient表列表"
// @Success 200 {object} response.Response{data=object,msg=string} "获取成功"
// @Router /patient/getPatientPublic [get]
export const getPatientPublic = () => {
  return service({
    url: '/patient/getPatientPublic',
    method: 'get',
  })
}
